package com.emergency.evaluate.domain;

import com.emergency.base.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonIgnore;

import javax.persistence.*;

/**
 * 与评分表对应的分数表
 */
@Entity
@Table(name = "eva_score")
public class Score extends BaseEntity {

    //评分人姓名
    private String pname;
    //评分分数
    private double score;
    //评分等级
    private String level;



    //对应提取指标ID
    @OneToOne(targetEntity = Extract.class, fetch= FetchType.LAZY)
    @JoinColumn(name = "extract_id", referencedColumnName = "id")
    private Extract extract;

    //分数表与评分表的id对应
    @JsonIgnore
    @OneToOne(targetEntity = Manual.class, fetch= FetchType.LAZY)
    @JoinColumn(name = "manual_id", referencedColumnName = "id")
    private Manual manual;

    public String getPname() {
        return pname;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level;
    }

    public Manual getManual() {
        return manual;
    }

    public void setManual(Manual manual) {
        this.manual = manual;
    }

    public Extract getExtract() {
        return extract;
    }

    public void setExtract(Extract extract) {
        this.extract = extract;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }


    public Score() {
    }
}
